<template>
     <a-card :bordered="false">
        <div>
            <a-tabs default-active-key="1" @change="callback">
                <a-tab-pane key="1" tab="药品医材">
                   
                </a-tab-pane>
                <a-tab-pane key="4" tab="医疗项目">
                   
                </a-tab-pane>
            </a-tabs>
            <div class="tab-box">
                <component :is="tablelist" :keyIndex="keyIndex"></component>
            </div>
        </div>
    </a-card>
  
</template>

<script>
import WhDrugWesternList from './WhDrugWesternList.vue'
import WhServiceProjectList from './WhServiceProjectList.vue'
export default {
    data(){
        return{
            tablelist:'WhDrugWesternList',
            keyIndex:1
        }
    },
    components:{
        WhDrugWesternList,
        WhServiceProjectList,
    },
    methods:{
        callback(key) {
            var that = this;
            this.keyIndex = key;
            switch (key*1) {
                case 1:
                    that.tablelist = 'WhDrugWesternList'
                    break;
                case 4:
                    that.tablelist = 'WhServiceProjectList'
                    break;
            }
        },
    }
}
</script>

<style lang="less" scoped>

</style>